package com.ruoyi.system.controller;

import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Set;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.system.domain.Student;
import com.ruoyi.system.service.AopDemoService;

/**
 * 测试AOP Controller
 * 
 * @author ruoyi
 * @date 2024-04-19
 */
@Controller
@RequestMapping("/system/aop")
public class AopDemoController extends BaseController
{
    private String prefix = "system/aop";

    @Autowired
    private AopDemoService aopDemoService;

    @RequiresPermissions("system:aop:view")
    @GetMapping()
    @ResponseBody
    public String student()
    {
        return "There is nothing.";
    }

    /**
     * 调用demoMethod方法
     */
    @RequiresPermissions("system:aop:demo")
    @GetMapping("/demo")
    @ResponseBody
    public String list(Student student)
    {
    	aopDemoService.demoMethod();
        return "success";
    }

    
}
